package com.donger.business.upms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.donger.business.upms.entity.SysDict;
import com.donger.business.upms.mapper.SysDictMapper;
import com.donger.business.upms.service.ISysDictService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;


/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author xyx
 * @since 2019-01-12
 */
@Service("sysDictService")
@Slf4j
public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> implements ISysDictService {

    @Override
    @Cacheable(value = "dictTableCache")
    public String queryTableDictTextByKey(String table, String text, String code, String key) {
        log.info("无缓存dictText的时候调用这里！");
        return baseMapper.queryTableDictTextByKey(table, text, code, key);
    }

    @Override
    @Cacheable(value = "dictCache")
    public String queryDictTextByKey(String code, String key) {
        log.info("无缓存dictText的时候调用这里！");
        return baseMapper.queryDictTextByKey(code, key);
    }
}
